<template>
    <!-- 关于R-Chat界面 -->
    <ContentPanel :showTopBorder="false">
        <el-form ref="formDataRef" label-width="80px" @submit.prevent>
            <el-form-item label="版本信息">
                <div class="version-info">
                    <div>R-Chat {{ config.version }}</div>
                    <div>
                        <el-button type="primary" @click="checkUpdate">检查更新</el-button>
                    </div>
                </div>
            </el-form-item>
        </el-form>
    </ContentPanel>
    <Update :autoUpdate="false" ref="updateRef"></Update>
</template>

<script setup>
import Update from "../Update.vue";
import config from "../../../../../package.json";
import { ref, reactive, getCurrentInstance, nextTick, watch } from "vue"
import { useRoute, useRouter } from "vue-router";
const { proxy } = getCurrentInstance();
const route = useRoute();
const router = useRouter();

const updateRef = ref(null);
/* 检测更新 */
const checkUpdate = () => {
    updateRef.value.checkUpdate(false);
}
</script>

<style lang="scss" scoped></style>
